<!DOCTYPE HTML>
<html>

<head>
    <title> 详情页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <!-- 编辑器 -->
    <link href="../../../assets/tools/wysiwyg/bootstrap-combined.no-icons.min.css" rel="stylesheet">
    <!--     <link href="../../../assets/tools/wysiwyg/bootstrap-responsive.min.css" rel="stylesheet"> -->
    <link href="http://netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet">
    <link rel="stylesheet" href="../../../assets/tools/wysiwyg/index.css" type="text/css"> </link>
    <link href="../../../assets/css/dpl-min.css" rel="stylesheet" type="text/css"/>
    <link href="../../../assets/css/bui-min.css" rel="stylesheet" type="text/css" />
    <link href="../../../assets/css/page-min.css" rel="stylesheet" type="text/css" />
    <link href="../../../assets/css/jx-style.css" rel="stylesheet" type="text/css" />
    <link href="../../../assets/css/prettify.css" rel="stylesheet" type="text/css" />
</head>
<style>
      #editor {
        overflow: scroll;
        max-height: 300px
    }
</style>
<body>
    <div class="container">
        <div class="detail-page span24">
            <div class="">
                <h3>商品品牌</h3>
                <hr>
            </div>
            <div class="detail-section">
                <div class="row detail-row">
                    <div class="span24">
                        <form class="form-horizontal">
                            <div class="row">
                                <div class="control-group span12 offset6">
                                    <label class="control-label">
                                        <s>*</s>品牌名称：</label>
                                    <div class="controls">
                                        <input name="b" type="text" data-rules="{required:true}" class="input-normal control-text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="control-group span12 offset6">
                                    <label class="control-label">
                                        <s>*</s>排序：</label>
                                    <div class="controls">
                                        <input name="a" type="text" data-rules="{required:true,number:true}" class="input-normal control-text">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="control-group span12 offset6">
                                    <label class="control-label ml-10">缩略图：</label>
                                    <div class="">
                                        <div id="J_Uploader">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row" style="margin-top: 18px">
                                <div class="control-group">
                                    <label class="control-label">自定义描述：</label>
                                    <div class="span20">
                                        <div id="alerts"></div>
                                        <div class="btn-toolbar" data-role="editor-toolbar" data-target="#editor">
                                            <div class="btn-group">
                                                <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font"><i class="icon-font"></i><b class="caret"></b></a>
                                                <ul class="dropdown-menu">
                                                </ul>
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn dropdown-toggle" data-toggle="dropdown" title="Font Size"><i class="icon-text-height"></i>&nbsp;<b class="caret"></b></a>
                                                <ul class="dropdown-menu">
                                                    <li>
                                                        <a data-edit="fontSize 5">
                                                            <font size="5">Huge</font>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a data-edit="fontSize 3">
                                                            <font size="3">Normal</font>
                                                        </a>
                                                    </li>
                                                    <li>
                                                        <a data-edit="fontSize 1">
                                                            <font size="1">Small</font>
                                                        </a>
                                                    </li>
                                                </ul>
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn" data-edit="bold" title="Bold (Ctrl/Cmd+B)"><i class="icon-bold"></i></a>
                                                <a class="btn" data-edit="italic" title="Italic (Ctrl/Cmd+I)"><i class="icon-italic"></i></a>
                                                <a class="btn" data-edit="strikethrough" title="Strikethrough"><i class="icon-strikethrough"></i></a>
                                                <a class="btn" data-edit="underline" title="Underline (Ctrl/Cmd+U)"><i class="icon-underline"></i></a>
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn" data-edit="insertunorderedlist" title="Bullet list"><i class="icon-list-ul"></i></a>
                                                <a class="btn" data-edit="insertorderedlist" title="Number list"><i class="icon-list-ol"></i></a>
                                                <a class="btn" data-edit="outdent" title="Reduce indent (Shift+Tab)"><i class="icon-indent-left"></i></a>
                                                <a class="btn" data-edit="indent" title="Indent (Tab)"><i class="icon-indent-right"></i></a>
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn" data-edit="justifyleft" title="Align Left (Ctrl/Cmd+L)"><i class="icon-align-left"></i></a>
                                                <a class="btn" data-edit="justifycenter" title="Center (Ctrl/Cmd+E)"><i class="icon-align-center"></i></a>
                                                <a class="btn" data-edit="justifyright" title="Align Right (Ctrl/Cmd+R)"><i class="icon-align-right"></i></a>
                                                <a class="btn" data-edit="justifyfull" title="Justify (Ctrl/Cmd+J)"><i class="icon-align-justify"></i></a>
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn dropdown-toggle" data-toggle="dropdown" title="Hyperlink"><i class="icon-link"></i></a>
                                                <div class="dropdown-menu input-append">
                                                    <input class="span2" placeholder="URL" type="text" data-edit="createLink" />
                                                    <button class="btn" type="button">Add</button>
                                                </div>
                                                <a class="btn" data-edit="unlink" title="Remove Hyperlink"><i class="icon-cut"></i></a>
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn" title="Insert picture (or just drag & drop)" id="pictureBtn"><i class="icon-picture"></i></a>
                                                <input type="file" data-role="magic-overlay" data-target="#pictureBtn" data-edit="insertImage" />
                                            </div>
                                            <div class="btn-group">
                                                <a class="btn" data-edit="undo" title="Undo (Ctrl/Cmd+Z)"><i class="icon-undo"></i></a>
                                                <a class="btn" data-edit="redo" title="Redo (Ctrl/Cmd+Y)"><i class="icon-repeat"></i></a>
                                            </div>
                                            <input type="text" data-edit="inserttext" id="voiceBtn" x-webkit-speech="">
                                        </div>
                                        <div id="editor">
                                            输入内容&hellip;
                                        </div>
                                    </div>
                                </div>
                                <div class="row">
                                    <div class="control-group span18 offset6">
                                        <label class="control-label">
                                            选择尺码类型:</label>
                                        <div id="types" class="controls bui-form-group checkboxs " style="padding-top: 7px">
                                            <label >
                                                <input name="types" value="types1" type="checkbox">鞋码 </label>
                                            <label >
                                                <input name="types" value="types2" type="checkbox">衣码</label>
                                            <label >
                                                <input name="types" value="types3" type="checkbox">儿童鞋码</label>
                                            <label >
                                                <input name="types" value="types4" type="checkbox">儿童服饰码</label>
                                            <label >
                                                <input name="types" value="types5" type="checkbox">配件码</label>
                                        </div>
                                    </div>
                                </div>
                                <div class="hide row" id="types1">
                                    <div class="control-group span18 offset6">
                                        <label class="control-label">
                                            默认鞋码表:</label>
                                        <div class="controls checkboxs" style="padding-top: 7px">
                                            <label>
                                                <input id="" name="ck" type="radio" value="UK" checked>UK</label>
                                            <label>
                                                <input id="" name="ck" type="radio" value="US">US</label>
                                            <label>
                                                <input id="" name="ck" type="radio" value="FR">FR</label>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <div class="controls checkboxs ">
                                            <table id="UK" class="table table-bordered span18 offset7">
                                                <thead>
                                                    <td>UK</td>
                                                    <td>5.5</td>
                                                    <td>6.0</td>
                                                    <td>6.5</td>
                                                    <td>7.0</td>
                                                    <td>7.5</td>
                                                </thead>
                                            </table>
                                            <table id="US" class="hide table table-bordered span18 offset7">
                                                <thead>
                                                    <td>US</td>
                                                    <td>5</td>
                                                    <td>6</td>
                                                    <td>7</td>
                                                    <td>8</td>
                                                    <td>9</td>
                                                </thead>
                                            </table>
                                            <table id="FR" class="hide table table-bordered span18 offset7">
                                                <thead>
                                                    <td>FR</td>
                                                    <td>5.5</td>
                                                    <td>6.0</td>
                                                    <td>6.5</td>
                                                    <td>7.0</td>
                                                    <td>7.5</td>
                                                </thead>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                                <div class="hide row" id="types2">
                                    <div class="control-group span18 offset6">
                                        <label class="control-label">
                                            默认衣服码:</label>
                                        <div class="controls checkboxs" style="padding-top: 7px">
                                            <label>
                                                <input id="" name="yf" type="radio" value="BZM" checked>标准码</label>
                                            <label>
                                                <input id="" name="yf" type="radio" value="SYM">上衣码</label>
                                            <label>
                                                <input id="" name="yf" type="radio" value="XZM">下装码</label>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <div class="controls">
                                            <table id="BZM" class="table table-bordered span18 offset7">
                                                <thead>
                                                    <td>标准码</td>
                                                    <td>S</td>
                                                    <td>SM</td>
                                                    <td>L</td>
                                                    <td>XL</td>
                                                    <td>XXL</td>
                                                </thead>
                                            </table>
                                            <table id="SYM" class="hide table table-bordered span18 offset7">
                                                <thead>
                                                    <td>上衣码</td>
                                                    <td>S</td>
                                                    <td>SM</td>
                                                    <td>L</td>
                                                    <td>XL</td>
                                                    <td>XXL</td>
                                                </thead>
                                            </table>
                                            <table id="XZM" class="hide table table-bordered span18 offset7">
                                                <thead>
                                                    <td>下装码</td>
                                                    <td>S</td>
                                                    <td>SM</td>
                                                    <td>L</td>
                                                    <td>XL</td>
                                                    <td>XXL</td>
                                                </thead>
                                            </table>
                                        </div>
                                    </div>
                                </div>
                            </div>
                    </div>
                </div>
                <div class="actions-bar">
                    <div class="row">
                        <div class="span12 offset10">
                            <button type="submit" class="button button-primary">确定</button>
                            <button type="button" id="close-page" class="button">取消</button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        </form>
    </div>
    <script type="text/javascript" src="../../../assets/js/jquery-1.8.1.min.js"></script>
    <script type="text/javascript" src="../../../assets/js/bootstrap.js"></script>
    <!--  <script type="text/javascript" src="../../../assets/tools/editor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript" src="../../../assets/tools/editor/ueditor.config.js"></script>
    <script type="text/javascript" src="../../../assets/tools/editor/ueditor.all.min.js">
    </script> -->
    <script type="text/javascript" src="../../../assets/js/bui-min.js"></script>
    <script type="text/javascript" src="../../../assets/js/config-min.js"></script>
    <!-- 编辑器 -->
    <script type="text/javascript" src="../../../assets/tools/wysiwyg/bootstrap-wysiwyg.js"></script>
    <script type="text/javascript" src="../../../assets/tools/wysiwyg/external/jquery.hotkeys.js"></script>
    <script type="text/javascript">
    BUI.use('common/page');
    </script>
    <script>
    $(function() {
        function initToolbarBootstrapBindings() {
            var fonts = ['Serif', 'Sans', 'Arial', 'Arial Black', 'Courier',
                    'Courier New', 'Comic Sans MS', 'Helvetica', 'Impact', 'Lucida Grande', 'Lucida Sans', 'Tahoma', 'Times',
                    'Times New Roman', 'Verdana'
                ],
                fontTarget = $('[title=Font]').siblings('.dropdown-menu');
            $.each(fonts, function(idx, fontName) {
                fontTarget.append($('<li><a data-edit="fontName ' + fontName + '" style="font-family:\'' + fontName + '\'">' + fontName + '</a></li>'));
            });
            $('a[title]').tooltip({
                container: 'body'
            });
            $('.dropdown-menu input').click(function() {
                    return false;
                })
                .change(function() {
                    $(this).parent('.dropdown-menu').siblings('.dropdown-toggle').dropdown('toggle');
                })
                .keydown('esc', function() {
                    this.value = '';
                    $(this).change();
                });

            $('[data-role=magic-overlay]').each(function() {
                var overlay = $(this),
                    target = $(overlay.data('target'));
                overlay.css('opacity', 0).css('position', 'absolute').offset(target.offset()).width(target.outerWidth()).height(target.outerHeight());
            });
            if ("onwebkitspeechchange" in document.createElement("input")) {
                var editorOffset = $('#editor').offset();
                $('#voiceBtn').css('position', 'absolute').offset({
                    top: editorOffset.top,
                    left: editorOffset.left + $('#editor').innerWidth() - 35
                });
            } else {
                $('#voiceBtn').hide();
            }
        };

        function showErrorAlert(reason, detail) {
            var msg = '';
            if (reason === 'unsupported-file-type') {
                msg = "Unsupported format " + detail;
            } else {
                console.log("error uploading file", reason, detail);
            }
            $('<div class="alert"> <button type="button" class="close" data-dismiss="alert">&times;</button>' +
                '<strong>File upload error</strong> ' + msg + ' </div>').prependTo('#alerts');
        };
        initToolbarBootstrapBindings();
        $('#editor').wysiwyg({
            fileUploadError: showErrorAlert
        });
    });
    </script>
    <script type="text/javascript">
    //关闭当前页
    $("#close-page").click(function() {
        top.topManager.closePage();
    });



    $("#types").find("input[name='types']").change(function() {
        var id = $(this).val();
        var ischecked = $(this).prop("checked");
        if (ischecked) {
            $("#" + id).removeClass("hide");
        } else {
            $("#" + id).addClass("hide");
        }
    });
    $("input[type='radio']").click(function() {
        var id = $(this).val();
        var ischecked = $(this).prop("checked");
        if (ischecked) {
            $("#" + id).removeClass("hide").siblings().addClass("hide");
        } else {
            $("#" + id).addClass("hide").siblings().removeClass("hide");
        }
    });
    </script>
    <!-- script start -->
    <script type="text/javascript">
    BUI.use('bui/uploader', function(Uploader) {

        //添加自定义主题
        Uploader.Theme.addTheme('imageView', {
            elCls: 'jx-imageViewTheme',
            //可以设定该主题统一的上传路径
            url: '../../../test/upload/upload.php',
            queue: {
                //结果的模板，可以根据不同状态进进行设置
                resultTpl: {
                    'default': '<div class="default">{name}</div>',
                    'success': '<div class="success"><img src="../../../test/upload/{url}" /></div>',
                    'error': '<div class="error"><span class="uploader-error">{msg}</span></div>',
                    'progress': '<div class="progress"><div class="bar" style="width:{loadedPercent}%"></div></div>'
                }
            }
        });

        var uploader = new Uploader.Uploader({
            //指定使用主题
            theme: 'imageView',
            render: '#J_Uploader',
            //不设时使用主题配置的上传路径
            url: '../../../test/upload/upload.php'
        }).render();
    });
    </script>
    <!-- script end -->

    <body>

</html>
